package com.itheima.test4;

import java.util.Scanner;

public class test2 {
    public static void main(String[] args) {
        //键盘录入的两套体系不能混用
        //先用nextInt()接收整数，再用nextLine()接收字符串，会导致nextLine()接收不到字符串
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int num = sc.nextInt();
        System.out.println(num);
        System.out.println("请输入一个字符串");
        String str = sc.nextLine();
        System.out.println(str);

    }
}
